/*
 * @Author: moeWang
 * @Date: 2022-03-02 16:23:39
 * @LastEditTime: 2022-03-04 09:55:04
 * @LastEditors: moeWang
 * @Description:
 * @FilePath: \nest-web\src\logical\common\models\Query.model.ts
 */

import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class QueryModel<T, M> {
  @ApiPropertyOptional({ description: '查询条件' })
  query: T;
  @ApiPropertyOptional({ description: '分页数据' })
  pagination: M;

  public getQuery(): T {
    return this.query;
  }

  public setQuery(query: T): void {
    this.query == query;
  }

  public getPagination(): M {
    return this.pagination;
  }

  public setPagination(pagination: M): void {
    this.pagination = pagination;
  }
}
